<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__CSS__/pintuer.css?v={$src_version}">
<link rel="stylesheet" href="__CSS__/admin.css?v={$src_version}">
<link rel="stylesheet" href="__CSS__/responsive.css?v={$src_version}">
<script src="__JS__/jquery-3.2.1.min.js?v={$src_version}"></script>
<script src="__JS__/pintuer.js?v={$src_version}"></script>
<script src="__JS__/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/layer.js?v={$src_version}"></script>
<script src="__JS__/ming.js?v={$src_version}"></script>
<script src="__JS__/responsive.js?v={$src_version}"></script>
<body>
<div class="panel admin-panel">
    <a type="button" class="button border-yellow" onclick="window.location.href='{:U('Project/add')}'" style="display:block;width:51px;padding:3px 5px; ">
      <span class="icon-plus-square-o"></span>添加
    </a>
 <table class="table table-hover text-center">
    <tr>
     <th>项目名称</th>
      <th>项目类型</th>
      <th>积分数量</th>
      <th>操作</th>
    </tr>
  <volist name="project" id="v">
    <tr>
      <td>{$v.pname}</td>
      <td><if condition="$v['opt'] eq '+'">加分项目<elseif condition="$v['opt'] eq '-'" />减分项目</if></td>
      <td>{$v.point}</td>
      <td>
       <div class="button-group"> 
            <a class="button border-main" href="{:U('Project/add')}?id={$v.pid}"><span class="icon-edit"></span> 修改</a> 
            <a class="button border-red " href="javascript:void(0)" onclick="return del({$v.pid})"><span class="icon-trash-o"></span> 删除</a> 
       </div>
      </td>
    </tr>
   </volist> 
   <?php if(intval(count($project))>0){ ?>
       <tr  class="no-hover" style="border-bottom:none"> <td style="border-bottom:none" colspan="80"><div class="pagelist"><?php echo $page; ?></div></td></tr>  
      <?php }else{ ?>  
         <tr  class="no-hover"><td style="border-bottom:none" colspan="80"><div class="pagelist"><?php  echo '暂无记录'; ?></div></td></tr> 
      <?php } ?>  
  </table>
</div>
<script type="text/javascript">
function del(id){
   	layer.confirm('您确定要删除吗?', {
        btn: ['确定','取消'] //按钮
     }, function(){
        //执行删除操作
		 $.mAjax("{:U('Project/del')}",{id:id},'json');
	  });
}
</script>
 
</body>
</html>